package org.jeecgframework.web.service;

import org.jeecgframework.core.common.model.json.AjaxJson;
import org.jeecgframework.core.common.service.CommonService;
import org.jeecgframework.web.system.pojo.base.CbsEngineAcceptEntity;
import org.jeecgframework.web.system.pojo.base.CbsEngineSceneCheckReportEntity;
import org.jeecgframework.web.system.pojo.base.CbsSceneCheckReportEntity;
import org.jeecgframework.web.system.pojo.base.CbsServiceReportEntity;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.Map;

public interface CbsServiceReportServiceI extends CommonService {

    public <T> void delete(T entity);

    public <T> Serializable save(T entity);

    public <T> void saveOrUpdate(T entity);

    /**
     * 默认按钮-sql增强-新增操作
     *
     * @param id
     * @return
     */
    public boolean doAddSql(CbsServiceReportEntity t);

    /**
     * 默认按钮-sql增强-更新操作
     *
     * @param id
     * @return
     */
    public boolean doUpdateSql(CbsServiceReportEntity t);

    /**
     * 默认按钮-sql增强-删除操作
     *
     * @param id
     * @return
     */
    public boolean doDelSql(CbsServiceReportEntity t);

    public Map<String, Object> getCharacter(String serviceId);

    //工程师PC端提交完工且需HD关单 发送邮件提醒
    public void sendEmailToHD(String serviceId);

    /**
     * 保存、暂存 引擎翻新完工单
     *
     * @param request
     * @param t
     * @return
     */
    public AjaxJson saveReport(HttpServletRequest request, CbsEngineSceneCheckReportEntity t);

    /**
     * 保存、暂存 光管翻新完工单
     *
     * @param request
     * @param t
     * @return
     */
    public AjaxJson saveYqReport(HttpServletRequest request, CbsEngineAcceptEntity t);

    /**
     * 现场服务完工报告 暂存
     *
     * @param cbsServiceReport
     * @param request
     * @return
     */
    public AjaxJson zanAdd(CbsServiceReportEntity cbsServiceReport, HttpServletRequest request);

    /**
     * 现场服务完工报告 提交
     *
     * @param cbsServiceReport
     * @param request
     * @return
     */
    public AjaxJson doAdd(CbsServiceReportEntity cbsServiceReport, HttpServletRequest request);

    /**
     * 现场检测完工单暂存和提交
     * @param request
     * @param cbsSceneCheckReport
     * @return
     */
    public AjaxJson addSceneCheckReport(HttpServletRequest request, CbsSceneCheckReportEntity cbsSceneCheckReport);
}
